namespace Dune {
  namespace Compose {
    template<typename INIT, typename BOUN>
    void assignequation(INIT& init, BOUN& boun, Dune::ParameterTree& ptree) {
      const int dim = ptree.get<int>("grid.dimension");
      const std::string equname = ptree.get<std::string>("equation.name");
      using namespace Dune::Equation;

//      if (equname == "ConstantAdvection") {
//        if (dim == 1) {
//          ConstantAdvection<1> equation(ptree);
//          std::cout << "assgin equation: ConstantAdvection 1" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 2) {
//          ConstantAdvection<2> equation(ptree);
//          std::cout << "assgin equation: ConstantAdvection 2" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 3) {
//          ConstantAdvection<3> equation(ptree);
//          std::cout << "assgin equation: ConstantAdvection 3" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        }
//      } // ConstantAdvection

//      if (equname == "ShallowWater") {
//        if (dim == 1) {
//          ShallowWater<1> equation(ptree);
//          std::cout << "assgin equation: ShallowWater 1" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 2) {
//          ShallowWater<2> equation(ptree);
//          std::cout << "assgin equation: ShallowWater 2" << std::endl;
//	  Dune::Compose::assigngrid(equation,init,boun,ptree);
//        }
//      } // ShallowWater

      if (equname == "SoundWave") {
        if (dim == 1) {
          SoundWave<1> equation(ptree);
          std::cout << "assgin equation: SoundWave 1" << std::endl;
          Dune::Compose::assigngrid(equation,init,boun,ptree);
        } else if (dim == 2) {
          SoundWave<2> equation(ptree);
          std::cout << "assgin equation: SoundWave 2" << std::endl;
          Dune::Compose::assigngrid(equation,init,boun,ptree);
        } else if (dim == 3) {
          SoundWave<3> equation(ptree);
          std::cout << "assgin equation: SoundWave 3" << std::endl;
          Dune::Compose::assigngrid(equation,init,boun,ptree);
        }
      } // SoundWave

//      if (equname == "Euler") {
//        if (dim == 1) {
//          Euler<1> equation(ptree);
//          std::cout << "assgin equation: Euler 1" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 2) {
//          Euler<2> equation(ptree);
//          std::cout << "assgin equation: Euler 2" << std::endl;
//	  Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 3) {
//          Euler<3> equation(ptree);
//          std::cout << "assgin equation: Euler 3" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        }
//      } // Euler

//      if (equname == "MHD") {
//        if (dim == 1) {
//          MHD<1> equation(ptree);
//          std::cout << "assgin equation: MHD 1" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 2) {
//          MHD<2> equation(ptree);
//          std::cout << "assgin equation: MHD 2" << std::endl;
//	  Dune::Compose::assigngrid(equation,init,boun,ptree);
//        } else if (dim == 3) {
//          MHD<3> equation(ptree);
//          std::cout << "assgin equation: MHD 3" << std::endl;
//          Dune::Compose::assigngrid(equation,init,boun,ptree);
//        }
//      } // MHD
    } // assginequation
  } // Compse
} // Dune
